Joeyonng
  • Notebook
  • Pages
  • About
  • Backyard
  1. Probability and Statistics
  2. 22  Moment Generating Function
  • Welcome
  • Notations and Facts
  • Linear Algebra
    • 1  Fields and Spaces
    • 2  Vectors and Matrices
    • 3  Span and Linear Independence
    • 4  Basis and Dimension
    • 5  Linear Map and Rank
    • 6  Inner Product and Norm
    • 7  Orthogonality and Unitary Matrix
    • 8  Complementary Subspaces and Projection
    • 9  Orthogonal Complement and Decomposition
    • 10  SVD and Pseudoinverse
    • 11  Orthogonal and Affine Projection
    • 12  Determinants and Eigensystems
    • 13  Similarity and Diagonalization
    • 14  Normal and Hermitian Matrices
    • 15  Positive Definite Matrices
  • Calculus
    • 16  Derivatives
    • 17  Chain rule
  • Probability and Statistics
    • 18  Probability
    • 19  Random Variables
    • 20  Expectation
    • 21  Common Distributions
    • 22  Moment Generating Function
    • 23  Concentration Inequalities I
    • 24  Convergence
    • 25  Limit Theorems
    • 26  Maximum Likelihood Estimation
    • 27  Bayesian Estimation
    • 28  Expectation-maximization
    • 29  Concentration Inequalities II
  • Learning Theory
    • 30  Statistical Learning
    • 31  Bayesian Classifier
    • 32  Effective Class Size
    • 33  Empirical Risk Minimization
    • 34  Uniform Convergence
    • 35  PAC Learning
    • 36  Rademacher Complexity
  • Machine Learning
    • 37  Linear Discriminant
    • 38  Perceptron
    • 39  Logistic Regression
    • 40  Multi-layer Perceptron
    • 41  Boosting
    • 42  Support Vector Machine
    • 43  Decision Tree
    • 44  Principle Component Analysis
  • Deep Learning
    • 45  Transformer

Table of contents

  • Properties of MGF
  1. Probability and Statistics
  2. 22  Moment Generating Function

22  Moment Generating Function

The nth moment of a random variable X is

\mathbb{E}_{X} [X^{n}]

and the nth central moment of X is

\mathbb{E}_{X} [(X - \mathbb{E}_{X} [X])^{n}].

Definition 22.1 (Moment generating function) The moment generating function (MGF) of a random variable X is a function M_{X} (s) that is defined as

M_{X} (s) = \mathbb{E}_{X} [e^{s X}] = \sum_{x \in \mathbb{R}} e^{s x} \mathbb{P}_{X} (x).

Corollary 22.1 The nth moment of the random variable can be derived by taking the nth derivative of M_{X} (s) and evaluating it at s = 0

\mathbb{E}_{X} [X^{n}] = \frac{ d^{n} }{ ds^{n} } M_{X} (s) \left.\right|_{s = 0}.

Proof

Recall that the Taylor series for e^{x} is

e^{x} = 1 + x + \frac{x^{2}}{2!} + \dots = \sum_{i = 0}^{\infty} \frac{x^{i}}{i !}.

Therefore, the Taylor series of e^{s X} is

e^{s X} = \sum_{i = 0}^{\infty} \frac{(s X)^{i}}{i!} = \sum_{i = 0}^{\infty} \frac{s^{i} X^{i}}{i !}.

The moment generating function can be written as

M_{X} (s) = \mathbb{E}_{X} [e^{s X}] = \mathbb{E}_{X} \left[ \sum_{i = 0}^{\infty} \frac{s^{i} X^{i}}{i !} \right] = \sum_{i = 0}^{\infty} \frac{\mathbb{E}_{X} [X^{i}] s^{i} }{i !}.

The nth moment is the coefficient of \frac{s^{k}}{k !} in the Taylor series ofM_{X} (s), which can be obtained by taking nth derivative M_{X} (s) and evaluating it at s = 0.

Properties of MGF

Corollary 22.2 The MGF of Y = a X + b can be computed as

M_{Y} (s) = e^{b s} M_{X} (a s).

Proof

\begin{aligned} M_{Y} (s) & = \mathbb{E}_{X} \left[ e^{s (a X + b)} \right] \\ & = e^{b s} \mathbb{E}_{X} \left[ e^{s a X} \right] \\ & = e^{b s} M_{X} (a s). \\ \end{aligned}

Corollary 22.3 Suppose X_{1}, \dots, X_{n} are independent random variables and X = \sum_{i = 1}^{n} X_{i}. Then we have the MGF of X as the sum of MGFs of X_{i}s,

M_{X} (s) = \prod_{i = 1}^{n} M_{X_{i}} (s).

Proof

\begin{aligned} M_{X} (s) & = \mathbb{E}_{X} [e^{s X}] \\ & = \mathbb{E}_{X} [e^{s \sum_{i = 1} X_{i}}] \\ & = \mathbb{E}_{X} [\prod_{i = 1}^{n} e^{s X_{i}}] \\ & = \prod_{i = 1}^{n} [e^{s X_{i}}] & [X_{i}\text{s are independent}] \\ & = \prod_{i = 1}^{n} M_{X_{i}} (s) \\ \end{aligned}

21  Common Distributions
23  Concentration Inequalities I